﻿
CREATE VIEW vw_LogEntry
AS

SELECT DeploymentId, RoleRowId, RoleName, InstanceNumber, DateTimeUTC,  EventLogName As LogName, EventSourceName As LogSource, EventLevel, [Description] AS [Mesage], 'WindowsEvent' As LogType
FROM [dbo].[vw_WindowsEventEntry_Detailed]

UNION ALL

SELECT DeploymentId, RoleRowId, RoleName, InstanceNumber, DateTimeUTC, 'Infrastructure' As LogName, FunctionName As LogSource, EventLevel, [Message], 'WADInfrastructure' As LogType
FROM [dbo].[vw_DiagnosticsInfrastructureLogEntry_Detailed]

UNION ALL

Select DeploymentId, RoleRowId, RoleName, InstanceNumber, DateTimeUTC, 'ETW' As LogName, '' As LogSource, EventLevel, [Message], 'ETW' As LogType
From [dbo].[vw_LogEvent_Detailed]



